package com.one.group.model.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Table("sp_resident_house_relation")
public class ResidentHouseRelation implements Serializable {

    @Id(keyType = KeyType.Auto)
    @Column("id")
    private Long id;

    @Column("user_id")
    private Long userId;

    @Column("house_id")
    private Long houseId;

    @Column("relation_type")
    private Integer relationType; // 0: 业主, 1: 租客

    @Column("owner_card_number")
    private String ownerCardNumber;

    @Column("relation_status")
    private Integer relationStatus; // 0: 已迁入, 1: 待审核, 2: 未通过

    @Column("occupancy_time")
    private Date occupancyTime;

    @Column("apply_time")
    private Date applyTime;

    @Column("apply_remark")
    private String applyRemark;

    @Column("approve_time")
    private Date approveTime;

    @Column("approve_admin_id")
    private Long approveAdminId;

    @Column("approve_remark")
    private String approveRemark;

    @Column("move_out_time")
    private Date moveOutTime;

    @Column("move_out_reason")
    private String moveOutReason;

    @Column("move_out_admin_id")
    private Long moveOutAdminId;

    @Column("create_time")
    private Date createTime;

    @Column("update_time")
    private Date updateTime;

    @Column(tenantId = true)
    private Long tenantId;
}
